package com.heatup.apt.api.service;

import com.heatup.apt.model.api.ApiResultModel;
import com.heatup.apt.model.coach.CoachInfo;
import com.heatup.apt.model.course.CourseSign;
import com.heatup.apt.model.order.OrderInfo;
import com.heatup.apt.model.user.UserInfo;

import java.util.Date;
import java.util.List;
import java.util.Map;


public interface CourseSignService {

    /**
     * 根据用户id 课程id查询用户课程信息
     *
     * @param courseId
     * @param userId
     */
    List<Map<String, Object>> queryUserCourseInfo(Integer userId, Integer courseId, Integer isclose, Integer orderId);

    /**
     * 销课
     *
     * @param storeId   门店地址
     * @param closeTime 销课时间
     * @return
     */
    Integer closeCourse(Integer id, Integer storeId, Date closeTime, Date startTime);

    /**
     * 课程详情
     *
     * @param courseId 课程ID
     * @param mobile   教练手机  @return
     * @throws Exception
     */
    Map<String, Object> chaxuCoachCourseInfoById(Integer courseId, String mobile) throws Exception;

    /**
     * 用户签到
     *
     * @param courseId 课程ID
     * @param openId   用户openId
     * @return
     * @throws Exception
     */
    ApiResultModel courseCoachUserSign(Integer courseId, String openId) throws Exception;

    /**
     * 用户签到详情
     *
     * @param courseId 课程ID
     * @param userId   用户Id
     * @return
     * @throws Exception
     */
    ApiResultModel courseUserSignInfo(Integer courseId, Integer userId) throws Exception;

    /**
     * 教练 檬营开启/关闭签到
     *
     * @param courseId     课程 ID
     * @param courseNumber 课时时序
     * @param userId 用户 ID
     * @param type         签到类型 1开启 0关闭
     * @return
     */
    boolean campCourseSignIn(Integer courseId, Integer courseNumber, Integer userId, Integer type) throws Exception;

    int updateCancelCourse(String num, String id, String courseId,
                           String storeId, String orderId, String startTime, String closeTime, Integer userId) throws Exception;


    /**
     *@Author: timo
     *@Date: 2018/3/27 11:18
     *@Description:
     * 教练端 - 添加日程管理
     *
     */
    ApiResultModel saveCourseSign(UserInfo userInfo, CourseSign courseSign);

    /**
     *@Author: timo
     *@Date: 2018/3/28 21:30
     *@Description:
     * 查询教练日程列表
     *
     */
    ApiResultModel queryCoachCourseSignList(UserInfo userInfo, Date queryDate, Integer sonCoachId, Integer isChiefCoach);

    /**
     *@Author: timo
     *@Date: 2018/3/28 22:03
     *@Description:
     * 查询日程详情
     *
     */
    ApiResultModel queryCourseSignDetail(UserInfo userInfo , Integer courseSignId, Integer orderType);

    /**
     *@Author: timo
     *@Date: 2018/3/29 16:51
     *@Description:
     * 取消日程
     *
     */
    ApiResultModel cancelCourseSign(UserInfo userInfo, Integer courseSignId, Integer courseType, Integer coachId);


    ApiResultModel queryCoachNoteList(UserInfo userInfo,Integer pageIndex, Integer pageSize);

    ApiResultModel delCourseSign(UserInfo userInfo, CoachInfo coachInfo, Integer courseSignId);

    Map<String,Object> queryCoachPrivateCourseSignList(Map<String, Object> paramsMap);

    /**
     *@Author: timo
     *@Date: 2018/4/2 10:57
     *@Description:
     * 用户端签到修改日程表中的状态
     *
     */
    boolean userSignUpdateCourseSign(Integer courseSignId, Integer personCount);

    /**
     *@Author: timo
     *@Date: 2018/4/4 10:25
     *@Description:
     * 查询教练备忘录详情
     *
     */
    ApiResultModel queryCoachNoteDetail(CoachInfo coachInfo, Integer courseSignId);


}
